package com.yangwp.jie.controller;

import com.yangwp.jie.common.enums.RetCodeEnum;
import com.yangwp.jie.common.utils.MapUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CookieValue;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

@Controller
@RequestMapping("/jie/me")
public class MeController {

    @RequestMapping("")
    public String me(){
        return "/main/me.ftl";
    }


    @RequestMapping("/sign")
    @ResponseBody
    public Map<String, Object> signIn(@CookieValue(value = "jie_name", required = false) String nickName){

        System.out.println(nickName);
        return MapUtils.getRetMap(RetCodeEnum.SUCCESS);
    }
}
